int areaOfMaxDiagonal(int** dimensions, int dimensionsSize, int* dimensionsColSize)
{
    int  max_size = 0;
    double max_diagonal = 0;
    for (int i = 0; i < dimensionsSize; i++)
    {
        double a = dimensions[i][0], b = dimensions[i][1];
        double tmp_diagonal = sqrt(a * a + b * b);
        int tmp_size = a * b;
        if (tmp_diagonal == max_diagonal && tmp_size > max_size)
        {
            max_size = tmp_size;
            *dimensionsColSize = i;
        }
        if (tmp_diagonal > max_diagonal)
        {
            max_size = tmp_size;
            *dimensionsColSize = i;
            max_diagonal = tmp_diagonal;
        }
    }
    return max_size;
}